<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>麦包郎</title>
    <meta name="description" content="麦包郎" />
    <meta name="keywords" content="麦包郎"/>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" href="css/amazeui.min.css" />
    <link rel="stylesheet" href="css/style.css" />
    <script type="text/javascript" src="js/jquery.min.js" ></script>
    <script type="text/javascript" src="js/amazeui.min.js" ></script>

	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <header data-am-widget="header" class="am-header am-header-default header">
    <div class="am-header-left am-header-nav">
        <a href="<%=basePath%>emp/goMember" class="">
            <i class="am-header-icon am-icon-angle-left"></i>
        </a>
    </div>
    <h1 class="am-header-title"> <a href="#title-link" class="" style="color: #333;">我的订单</a></h1>
    <div class="am-header-right am-header-nav">
        <a href="#right-link" class=""> </a>
    </div>
</header>
<div class="cate-search" style="position: relative; top: 0; border-bottom: 0;">

    <input type="button" class="cate-btn">
</div>
<ul class="order-style">
    <!--<li ><a href="guanli.html">未收获</a></li>-->
    <li  style="    width: 25%;" ><a href="<%=basePath%>ord/today">今日订单</a></li>
    <li  style="    width: 25%;" class="current"><a>历史订单</a></li>



</ul>
<c:forEach items="${shangMap}" var="shang">
 <c:if test="${!empty shang.value}">
<div class="c-comment">
    <span class="c-comment-num">订单编号：NO${shang.key.id}</span>
</div>
<div class="c-comment">
    <span style=" float: left;" class="c-comment-suc">日期：<fmt:formatDate value="${shang.key.time}" pattern="yyyy-MM-dd HH:mm:ss"/></span>
</div>
<div class="c-comment-list" style="border: 0;">
<c:set value="0" var="shu"></c:set>
<c:set value="0" var="total"></c:set>
<c:forEach items="${shang.value}" var="sa">
			<a class="o-con" >
            	<div class="o-con-img"><img src="<%=basePath %>${sa.image}"></div>
                <div class="o-con-txt">
                	<p>${sa.name }</p>
                	<c:set value="${shu+sa.num}" var="shu"></c:set>
                	<c:set value="${total+sa.total}" var="total"></c:set>
                	<p class="price">￥${sa.total/sa.num}</p>
                	<p>合计：<span>￥<fmt:formatNumber type="number" value="${(sa.total/sa.num)*sa.num}" maxFractionDigits="1"/></span></p>
                </div>
            	<div class="o-con-much"> <h4>x${sa.num}</h4></div>
            	
            </a>
            </c:forEach>
    <div class="c-com-money">${shu}个商品 实付金额：<span>￥<fmt:formatNumber type="number" value="${total}" maxFractionDigits="1"/></span></div>
</div>
<div class="clear"></div>
</c:if>
</c:forEach>


  </body>
</html>
